<%--
  Created by IntelliJ IDEA.
  User: 李重恩
  Date: 2024/4/7
  Time: 13:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>员工详情信息</title>
    <link href="resource/css/style.css" rel="stylesheet" type="text/css"/>
    <script language="JavaScript" src="resource/js/jquery.js"></script>
    <script src="resource/js/cloud.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".click").click(function () {
                $(".tip").fadeIn(200);
            });

            $(".tiptop a").click(function () {
                $(".tip").fadeOut(200);
            });

            $(".sure").click(function () {
                $(".tip").fadeOut(100);
            });

            $(".cancel").click(function () {
                $(".tip").fadeOut(100);
            });

        });

    </script>
    <script>

        var msg = "${msg}";
        if (msg != null && msg != "") {
            alert(msg);
        }
    </script>
</head>

<body>

<div class="rightinfo">
    <%--用户表--%>
    <table class="tablelist">
        <thead>
        <tr>
            <th><input name="" type="checkbox" value="" checked="checked"/></th>
            <th>编号<i class="sort"><img src="resource/images/px.gif"/></i></th>
            <th>用户名称</th>
            <th>头像</th>
            <th>年龄</th>
            <th>生日</th>
            <th>邮箱</th>
            <th>手机号</th>
            <th>角色</th>
            <th>操作</th>
        </tr>
        </thead>

        <tbody>
        <c:forEach items="${users}" var="users" varStatus="num">
            <tr>
                <td><input name="" type="checkbox" value=""/></td>
                <td>${num.index+1}</td>
                <td>${users.uname}</td>
                <td><img src="${users.image}" width="70px"></td>
                <td>${users.age}</td>
                <td>${users.birthday}</td>
                <td>${users.email}</td>
                <td>${users.phone}</td>
                <td>${users.role.role}</td>
                <td><a href="ceogetuserbyid?id=${users.uid}" class="tablelink">查看详情</a>
                    <button onclick="delqc(${users.uid})" class="tablelink">删除</button>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>

        <%--step 每次加多少--%>
    <c:forEach var="i" begin="1" end="${total}" step="1">
        <c:if test="${i == nowPage}">
            <a class="btn btn-primary"
               href="${pageContext.request.contextPath}/ceolookalluser?pageNo=${i}"
               role="button">${i}
            </a>
        </c:if>
        <c:if test="${i != nowPage}">
            <a class="btn btn-default"
               href="${pageContext.request.contextPath}/ceolookalluser?pageNo=${i}"
               role="button">${i}
            </a>
        </c:if>
    </c:forEach>

    <script>
        function delqc(id) {
            var b = window.confirm("你确定要删除吗")
            if (b) {
                //跳转页面 get的传递方式 拼接url
                location.href = "ceodeleteuser?id=" + id;
            }
        }
    </script>

</div>


<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>

</body>
</html>


